<template>
  <div>
    <h2>请选择你喜欢的专栏</h2>
    <div v-for="(item, index) in val" :key="index">
      <input v-model="arr" v-bind:value="item" type="checkbox" />
      {{ item }}
    </div>

    <ul>
      <li v-for="(value, index) in arr" :key="index">{{ value }}</li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      arr: [],
      val: ["科幻", "喜剧", "动漫", "冒险", "科技", "军事", "娱乐", "奇闻"],
    };
  },
  methods: {},
};
</script>

<style>
</style>